//
//  MyiOSViewFactory.swift
//  Runner
//
//  Created by liuhc on 2023/4/13.
//

import Foundation
import Flutter

class MyiOSViewFactory: NSObject,FlutterPlatformViewFactory {
    
    private var messenger:FlutterBinaryMessenger
    
    init(messenger:FlutterBinaryMessenger) {
        self.messenger = messenger
        super.init()
    }
    
    func create(withFrame frame: CGRect,
                viewIdentifier viewId: Int64,
                arguments args: Any?) -> FlutterPlatformView {
        return MyiOSView(
            frame:frame,
            viewID: viewId,
            args: args,
            messenger: messenger)
    }
    
    func createArgsCodec() -> FlutterMessageCodec & NSObjectProtocol {
        return FlutterStandardMessageCodec.sharedInstance()
    }
}


